package com.lch.designpattern.singleton.threadlocal;

/**
 * @author: liuchenhui
 * @create: 2019-04-17 22:23
 **/
public class ThreadLocalSingletonRunable implements Runnable {
    @Override
    public void run() {
        ThreadLocalSingleton singleton = ThreadLocalSingleton.getInstance();
        ThreadLocalSingleton singleton1 = ThreadLocalSingleton.getInstance();
        ThreadLocalSingleton singleton2 = ThreadLocalSingleton.getInstance();
        System.out.println(Thread.currentThread().getName() + ":" + singleton);
        System.out.println(Thread.currentThread().getName() + ":" + singleton1);
        System.out.println(Thread.currentThread().getName() + ":" + singleton2);
    }
}
